package com.springapp.service.impl;

import com.springapp.dao.dao.impl.CommandeDAO;
import com.springapp.model.Commande;
import com.springapp.service.ICommandeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by Thomas on 23/06/14.
 */

@Service
public class CommandeService implements ICommandeService {
    @Autowired
    private CommandeDAO cmdDAO;

    @Override
    public Commande get(int id) {
        return null;
    }

    @Override
    public void delete(int id) {

    }
    @Override
    public Boolean update(String sRef) {
        return cmdDAO.update(sRef);

    }

    @Override
    public boolean updateStatusCmdAfected(String sLogin){
        return cmdDAO.updateStatusCmdAfected(sLogin);
    }

    @Override
    public Commande add(Commande commande) {
        return null;
    }

    @Override
    public void merge(Commande commande) {

    }

    @Override
    public List<Commande> getLstCmdInPrepa(String sLogin){
        return cmdDAO.getLstCmdInPrepa(sLogin);
    }

    @Override
    public List<Commande> getAllByRef(String sRef) {
        return cmdDAO.getAllByRef(sRef);
    }

    @Override
    public List<Commande> getLstCmd(String sLogin) {
        return cmdDAO.getLstCmd(sLogin);
    }

    @Override
    public List<Commande> getLstCmdNotPrepared() {
        return cmdDAO.getLstCmdNotPrepared();
    }


}
